<!--********************************************************************
* Copyright© 2000 - 2025 SuperMap Software Co.Ltd. All rights reserved.
*********************************************************************-->
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title data-i18n="resources.title_attribution"></title>
    <script type="text/javascript" src="../js/include-web.js"></script>
    <script type="text/javascript" src="../../dist/ol/include-ol.js"></script>
</head>
<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
<div id="map" style="margin:0 auto;width: 100%;height: 100%;"></div>
<script>
    var map,
        url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-world/rest/maps/World";

    map = new ol.Map({
        // ol v7版本用法为ol.control.defaults.defaults； v6版本以下用法为ol.control.defaults
        controls: ol.control.defaults.defaults({attribution: false, zoom: false}),
        target: 'map',
        view: new ol.View({
            center: [0, 0],
            zoom: 2,
            projection: 'EPSG:4326',
            multiWorld: true
        })
    });

    var layer = new ol.layer.Tile({
        source: new ol.source.TileSuperMapRest({
            url: url
        }),
        projection: 'EPSG:4326'
    });
    //添加版权控件
    map.addControl(new ol.control.Attribution({collapsed: false}));
    map.addLayer(layer);
</script>
</body>
</html>